{% extends 'base.html' %}
{% block content %}
    <h1>Your tasks</h1>
    <div class="column" style="width:40%">
        <h2>List of tasks</h2>
        <table id="task-list-list">
            <tr><td><a href="{% url 'all-tasks' %}">All</a></td></tr>
            {% for list in lists %}
            <tr><td><a href="{% url 'task-list' list.pk %}">{{list.name}}</td></tr>
            {% endfor %}
        </table>
    </div>
    <div id="task-list" class="column" style="width: 60%">
        <h2>Tasks</h2>
        <table>
            <tr>
                <th>Name</th>
                <th>State</th>
                <th>Created at</th>
            </tr>
            {% for task in tasks %}
                <tr>
                    <td>{{task.name}}</td>
                    <td>{{task.get_state_display}}</td>
                    <td>{{task.crated}}</td>
                </tr>
            {% endfor %}
        </table>
    </div>
    <div class="clear"></div>
{% endblock %}